<template>
    <div class="page">
        <Editor ref="editorRef" v-model:msg="emailForm.msg" />
    </div>
    <div><a-button type="primary" @click="btn">获取</a-button>-----<a-button type="primary" @click="btn1">修改</a-button></div>
    <div></div>
</template>
  
<script  lang="ts" setup>
import Editor from '@/components/Quill/index.vue'
import { reactive, ref } from 'vue';
const emailForm = reactive({
    msg: ''
})
const editorRef = ref()
// 获取值
const btn = () => {
    console.log(emailForm.msg);

}
const btn1 = () => {

    editorRef.value.setMsg('<p><span style="color: rgb(230, 0, 0);">666大赛即将6</span></p>')
    editorRef.value.focusLast()
}
</script>
